﻿namespace etracks.Web
{
    using etracks.EntityModels;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;

    /// <summary>
    /// ViewModel used in IssueController, Index action
    /// </summary>
    public class IssueIndexViewModel
    {
        public int Issues { get; set; }
    }

    /// <summary>
    /// ViewModel used in IssueController, List action
    /// </summary>
    public class IssueListViewModel
    {
        public List<IssueReadOnlyViewModel> IssueList { get; set; }

        public IssueListViewModel()
        {
            this.IssueList = new List<IssueReadOnlyViewModel>();
        }
    }

    /// <summary>
    /// ViewModel used in IssueController, Search action
    /// </summary>
    public class IssueSearchViewModel
    {
        public string Search_Term { get; set; }

        public List<Issue> IssueList { get; set; }

        public IssueSearchViewModel()
        {
            this.IssueList = new List<Issue>();
        }
    }

    public class IssueRegistrationViewModel : Issue 
    {
        public List<Project> ProjectList { get; set; }
    }

    public class IssueReadOnlyViewModel : Issue
    {
        public string ProjectName { get; set; }
    }

}

